app.post('/login',(req,res)=>{
    let{ username , password }=req.body
let token = jwt.sign({
    uid: 1000,
    username,
    time: Date.now() + 7200000
  }, secretKey)
   if(req.body.username==='jack'&&req.body.password==='123'){
    res.send({
        code:0,
        mes:'ok',
        data:{
            name:username,
            uid:1000,
            token,
            menu: [
                {id: 1, name: '用户管理', path: '/admin/user', icon: 'el-icon-user-solid'},
                {id: 2, name: '电影管理', path: '/admin/movie', icon: 'el-icon-video-camera-solid'},
                {id: 3, name: '订单管理', path: '/admin/order', icon: 'el-icon-video-camera-solid'},
              ]
        }
    })
   }else if(req.body.username==='bobo'&&req.body.password==='123'){
    res.send({
        code:0,
        mes:'ok',
        data:{
            name:username,
            uid:1000,
            token,
            menu: [
                {id: 1, name: '用户管理', path: '/admin/user', icon: 'el-icon-user-solid'},
                {id: 2, name: '电影管理', path: '/admin/movie', icon: 'el-icon-video-camera-solid'},
              ]
        }
    })
   }else if(req.body.username==='周浩宇'&&req.body.password==='123456'){
    res.send({
        code:0,
        mes:'ok',
        data:{
            name:username,
            uid:1000,
            token,
            menu: [
                {id: 1, name: '用户管理', path: '/admin/user', icon: 'el-icon-user-solid'},
                {id: 2, name: '电影管理', path: '/admin/movie', icon: 'el-icon-video-camera-solid'},
              ]
        }
    })
   }
   else{
    res.send({
        code:1,
        mes:'nono'
    })
   }
})